/**
 * MoveActivity.java
 */
package com.coffee.price.common;

import java.io.Serializable;
import java.util.ArrayList;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;

/**
 * @author gundallove
 * @email gundallove@gmail.com
 */
public class MoveActivity{

	private Intent intent;
	private Context ctx;
	private Class<?> cls;
	
	
	/**
	 * 
	 */
	public MoveActivity() {
		intent = new Intent();
	}

	/**
	 * @param context
	 * @param cs
	 */
	public MoveActivity(Context ctx, Class<?> cls) {
		this.ctx = ctx;
		this.cls = cls;
		
		intent = new Intent(this.ctx , this.cls);
	}
	
	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, boolean)
	 */
	public void putExtra(String name, boolean value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, boolean[])
	 */
	public void putExtra(String name, boolean[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, android.os.Bundle)
	 */
	public void putExtra(String name, Bundle value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, byte)
	 */
	public void putExtra(String name, byte value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, byte[])
	 */
	public void putExtra(String name, byte[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, char)
	 */
	public void putExtra(String name, char value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, char[])
	 */
	public void putExtra(String name, char[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, java.lang.CharSequence)
	 */
	public void putExtra(String name, CharSequence value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, double)
	 */
	public void putExtra(String name, double value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, double[])
	 */
	public void putExtra(String name, double[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, float)
	 */
	public void putExtra(String name, float value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, float[])
	 */
	public void putExtra(String name, float[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, int)
	 */
	public void putExtra(String name, int value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, int[])
	 */
	public void putExtra(String name, int[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, long)
	 */
	public void putExtra(String name, long value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, long[])
	 */
	public void putExtra(String name, long[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, android.os.Parcelable)
	 */
	public void putExtra(String name, Parcelable value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, android.os.Parcelable[])
	 */
	public void putExtra(String name, Parcelable[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, java.io.Serializable)
	 */
	public void putExtra(String name, Serializable value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, short)
	 */
	public void putExtra(String name, short value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, short[])
	 */
	public void putExtra(String name, short[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, java.lang.String)
	 */
	public void putExtra(String name, String value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putExtra(java.lang.String, java.lang.String[])
	 */
	public void putExtra(String name, String[] value) {
		this.intent.putExtra(name, value);
	}



	/**
	 * @param extras
	 * @return
	 * @see android.content.Intent#putExtras(android.os.Bundle)
	 */
	public void putExtras(Bundle extras) {
		this.intent.putExtras(extras);
	}



	/**
	 * @param src
	 * @return
	 * @see android.content.Intent#putExtras(android.content.Intent)
	 */
	public void putExtras(Intent src) {
		this.intent.putExtras(src);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putIntegerArrayListExtra(java.lang.String, java.util.ArrayList)
	 */
	public void putIntegerArrayListExtra(String name, ArrayList<Integer> value) {
		this.intent.putIntegerArrayListExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putParcelableArrayListExtra(java.lang.String, java.util.ArrayList)
	 */
	public void putParcelableArrayListExtra(String name,
			ArrayList<? extends Parcelable> value) {
		this.intent.putParcelableArrayListExtra(name, value);
	}



	/**
	 * @param name
	 * @param value
	 * @return
	 * @see android.content.Intent#putStringArrayListExtra(java.lang.String, java.util.ArrayList)
	 */
	public void putStringArrayListExtra(String name, ArrayList<String> value) {
		this.intent.putStringArrayListExtra(name, value);
	}

	/**
	 * @param packageContext
	 * @param cls
	 * @return
	 * @see android.content.Intent#setClass(android.content.Context, java.lang.Class)
	 */
	public void setClass(Context packageContext, Class<?> cls) {
		this.intent.setClass(packageContext, cls);
	}

	/**
	 * @param packageContext
	 * @param className
	 * @return
	 * @see android.content.Intent#setClassName(android.content.Context, java.lang.String)
	 */
	public void setClassName(Context packageContext, String className) {
		this.intent.setClassName(packageContext, className);
	}

	/**
	 * @param packageName
	 * @param className
	 * @return
	 * @see android.content.Intent#setClassName(java.lang.String, java.lang.String)
	 */
	public void setClassName(String packageName, String className) {
		this.intent.setClassName(packageName, className);
	}

	
	public void go(){
		
		ctx.startActivity(intent);
	}
	
	public void go(Activity atv){
		
		//들어온 activity 를 죽이고 intent로 이동
		Thread thread = new Thread(new ActivityHandler(atv));
		thread.start();
		
		//이동
		ctx.startActivity(intent);
	}
}
